home *** CD-ROM | disk | FTP | other *** search
- From: vandevod@cs.rpi.edu (David Vandevoorde)
- Message-ID: <xson373y8p4.fsf@avs.cs.rpi.edu>
- X-Original-Date: 31 Jan 1996 23:24:23 -0500
- Path: in1.uu.net!bounce-back
- Date: 01 Feb 96 13:17:00 GMT
- Approved: fjh@cs.mu.oz.au
- Newsgroups: comp.std.c++
- Subject: Re: inconsistance in over.over
- Organization: RPI Computer Science
- References: <4eo2mk$7tc@boy.nmd.msu.ru>
- In-Reply-To: krotoff@such.srcc.msu.su's message of 01 Feb 96 01:53:57 GMT
- X-Newsreader: Gnus v5.1
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMRC9WuEDnX0m9pzZAQGCmAF9G3u4e086NxWKeVcqKffDEnPRfvYEfvbm
- TZ7PB7Pwuei2UsjvvD80yxFBhf5Yei3G
- =dUqL
-
- >>>>> "AK" == Alexander Krotoff <krotoff@such.srcc.msu.su> writes:
- [...]
- AK> There is small inconsistance in the Oct 95 WP:
- AK> -----------------------------------------------------------------------
- AK> 13.4 Address of overloaded function [over.over]
- AK> In the example on the end of the section:
-
- AK> int (X::*p5)(int) = &(X::f); // error: wrong syntax for</B>
- AK> // pointer to member</B>
- AK> int (*p6)(long) = &(X::f); // OK</B>1
-
- AK> Error: qualified-id enclosed in parentheses.
- AK> -----------------------------------------------------------------------
- AK> 5.3.1 Unary operators [expr.unary.op]
-
- AK> 3 A pointer to member is only formed when an explicit & is used and
- AK> its operand is a qualified-id not enclosed in parentheses.
- AK> -----------------------------------------------------------------------
-
- AK> I suppose the error is in the over.over.
-
- I fail to see the problem. 5.3.1 (which you quote correctly) says that
- &X::f could be a pointer to member, but not &(X::f); so that explains
- the error in 13.4. &(X::f) resolves to the pointer to a static member
- function (which is a pointer to a regular function) in that same
- example, so that's fine. Note that the target type resolves the overload.
-
- Daveed
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
- is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
-